﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Example03.aspx.cs" Inherits="Chapter14.Example03" %>

<!DOCTYPE html>

<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>代码清单 14-3 使用 optgroup 元素</title>
    <meta name="author" content="Adam Freeman" />
    <meta name="description" content="A simple example" />
    <link rel="shortcut icon" href="Example01.Favicon.ico" type="image/x-ico" />
</head>
<body>
    <form action="Result.aspx">
        <p>
            <label for="name">Name:</label>
            <input id="name" name="name" />
        </p>
        <p>
            <label for="password">Password:</label>
            <input type="password" placeholder="Min 6 characters" size="6" id="password" name="password" />
        </p>
        <p>
            <label for="fave" style="vertical-align: top">Favorite Fruit:</label>
            <select id="face" name="fave">
                <optgroup label="Top Choices">
                    <option value="apples" selected="selected" label="Apples">Apples</option>
                    <option value="oranges" label="Oranges">Oranges</option>
                </optgroup>
                <optgroup label="Others">
                    <option value="cherries" label="Cherries">Cherries</option>
                    <option value="pears" label="Pears">Pears</option>
                </optgroup>
            </select>
        </p>
        <input type="submit" value="Submit" />
    </form>
</body>
</html>
